<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<style type="text/css">
			.tdh{
				font-size: 16px;
				text-align: center;
				height: 30px;
			}
		 	.thd{
			 	font-size: 16px;
				text-align: center;
				background-color: lightblue;
		 	}
		 	table{
		 		width: 100%;
		 	}
		</style>
<script type="text/javascript">
function choseStore(id,title,address,tel){
	onStoreChoosed(id,title,address,tel);
	addStoreDialog.close();
}
</script>
<div >
	    <div >
		    <div class="row" >
				<table border="1px" style="table-layout: fixed;" >  
				    <thead>  
				        <tr>  
				            <th width="5%" class="thd"><input type="checkbox" hidden="hidden"/>选择</th>  
				            <th width="15%" class="thd">分公司名称</th>  
				            <th width="20%" class="thd">分公司地址</th>  
				            <th width="10%" class="thd">分公司电话</th>  
				        </tr>  
				    </thead>  
				    <tbody>  
				      <c:if test="${fn:length(storelist) > 0}">
					    <c:forEach items="${storelist }" var="store" varStatus="s">
					        <tr onclick="choseStore('${store.storeid}','${store.title}','${store.address}','${store.tel}')">  
					            <td class="tdh"><input type="checkbox" name="check" value="${store.storeid}"/></td>  
					            <td class="tdh">${store.title}</td>  
					            <td style="word-wrap:break-word;" class="tdh">${store.address}</td>  
					            <td class="tdh">${store.tel}</td>  
					        </tr>  
					    </c:forEach>
				      </c:if>
				    </tbody>  
				</table>
			</div>
	 </div>
</div>
